﻿<?php
include 'conn.php';
include 'common.php';
session_start();
if(empty($_SESSION['username'])||$_SESSION['user_category']!=1)
{
	echo "<script language=JavaScript>alert('您无权访问该页面!'); window.location='index.php';</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>学生成绩查询</title>
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel='stylesheet' type='text/css' href='css/jquery.kwicks.css' />
<link rel="stylesheet" type="text/css" href="css/jiemian.css"/>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<script type="text/javascript"  src="js/jquery.min.js"></script>
<script src="js/modernizr.custom.63321.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

<!--[if lte IE 7]><style>.main{display:none;} .support-note .note-ie{display:block;}</style>
<![endif]-->
 <script>
$(function() {
$( document ).tooltip();
});
</script>
<style>
label {
display: inline-block;
width: 5em;
}
</style>
<style type='text/css'>
			.kwicks {
				width: 515px;
				height: 100px;
			}
			.kwicks > a {
				width: 125px;
				height: 100px;
				/* overridden by kwicks but good for when JavaScript is disabled */
				margin-left: 5px;
				float: left;
			}

			#panel-1 { background-color: #53b388; }
			#panel-2 { background-color: #5a69a9; }
			#panel-3 { background-color: #c26468; }
			#panel-4 { background-color: #bf7cc7; }
		</style>
</head>
<body>



<div class="container">
<div class="nav_header">
<!-- 
<div class='kwicks kwicks-horizontal'>
			<a href='#' id='panel-1' title="首页:回到成绩管理系统首页"></a>
			<a href='#' id='panel-2' title="关于:获取关于土塘中学成绩管理系统的信息"></a>
			<a href='#' id='panel-3' title="联系我们:联系管理员"></a>
			<a href='#' id='panel-4' title="退出:退出成绩管理系统"></a>
		</div>
		 -->
		<?php include 'stu_head.php';?>
		</div>
<div class="main_cj_content">	
<p class="welcome"><?php echo $_SESSION['username']; ?>,欢迎您,以下是您历次考试成绩:</p><hr>
<?php 
$userid=$_SESSION['userid'];
$exe="select * from grades where userid=$userid";
$rs=mysql_query($exe);
while($grades=mysql_fetch_array($rs))
{
	$yw=getgrads($grades, 'yw');
	$exam_date=getgrads($grades, 'exam_date');
	//echo $yw;
	
	$sx=getgrads($grades, 'sx');
	//echo $sx;
	$yy=getgrads($grades,'yy');
	$hx=getgrads($grades, 'hx');
	$sw=getgrads($grades, 'sw');
	$wl=getgrads($grades,'wl');
	$ls=getgrads($grades, 'ls');
	
	$dl=getgrads($grades,'dl');
	$zz=getgrads($grades, 'zz');
	echo "<fieldset><legend>考试时间：".$exam_date."</legend><br />";
	echo "<table><tr><td>科目</td><td>数学</td><td>英语</td><td>语文</td><td>物理
		</td><td>化学</td><td>生物</td><td>历史</td><td>地理</td> <td>政治</td></tr>
		<tr><td>分数</td><td>".$sx."</td><td>".$yw."</td><td>".$yw."</td><td>".$wl."</td><td>".$hx."</td><td>".$sw."</td><td>".$ls."</td><td>".$dl."</td><td>".$zz."</td></tr></table>";
echo "<br /></fieldset><br />";
}

?>
	</div>
	
	</div>
	
		

<!-- 
		<script src='js/jquery.kwicks.js' type='text/javascript'></script>
		
		<script type='text/javascript'>
			$(function() {
				$('.kwicks').kwicks({
					size: 125,
					maxSize : 250,
					spacing : 5,
					behavior: 'menu'
				});
			});
		</script>
		 -->
</body>
</html>